package com.sora.sora.common.model.vo;

import com.sora.sora.common.constant.ResultCode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class ResultVO<T> {

    private int status;

    private String msg;

    private T data;

    public ResultVO() {
    }

    public ResultVO(ResultCode resultCode, T data) {
        this.status = resultCode.getStatus();
        this.msg = resultCode.getMsg();
        this.data = data;
    }

    public ResultVO(T data) {
        this(ResultCode.CREATED, data);
    }

    public ResultVO(ResultCode resultCode) {
        this(resultCode, null);
    }
}
